package com.ruoyi.project.system.userCoachBind.service;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.system.userCoachBind.mapper.UserCoachBindMapper;
import com.ruoyi.project.system.userCoachBind.domain.UserCoachBind;
import com.ruoyi.project.system.userCoachBind.service.IUserCoachBindService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 学员教练绑定 服务层实现
 * 
 * @author zhangshilin
 * @date 2019-07-26
 */
@Service
public class UserCoachBindServiceImpl implements IUserCoachBindService 
{
	@Autowired
	private UserCoachBindMapper userCoachBindMapper;

	/**
     * 查询学员教练绑定信息
     * 
     * @param id 学员教练绑定ID
     * @return 学员教练绑定信息
     */
    @Override
	public UserCoachBind selectUserCoachBindById(Integer id)
	{
	    return userCoachBindMapper.selectUserCoachBindById(id);
	}
	
	/**
     * 查询学员教练绑定列表
     * 
     * @param userCoachBind 学员教练绑定信息
     * @return 学员教练绑定集合
     */
	@Override
	public List<UserCoachBind> selectUserCoachBindList(UserCoachBind userCoachBind)
	{
	    return userCoachBindMapper.selectUserCoachBindList(userCoachBind);
	}
	
    /**
     * 新增学员教练绑定
     * 
     * @param userCoachBind 学员教练绑定信息
     * @return 结果
     */
	@Override
	public int insertUserCoachBind(UserCoachBind userCoachBind)
	{
	    return userCoachBindMapper.insertUserCoachBind(userCoachBind);
	}
	
	/**
     * 修改学员教练绑定
     * 
     * @param userCoachBind 学员教练绑定信息
     * @return 结果
     */
	@Override
	public int updateUserCoachBind(UserCoachBind userCoachBind)
	{
	    return userCoachBindMapper.updateUserCoachBind(userCoachBind);
	}

	/**
     * 删除学员教练绑定对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteUserCoachBindByIds(String ids)
	{
		return userCoachBindMapper.deleteUserCoachBindByIds(Convert.toStrArray(ids));
	}
	
}
